package com.songlanyun.modules.order.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.songlanyun.common.enums.OrderConstant;
import com.songlanyun.modules.order.dao.OrderDao;
import com.songlanyun.modules.order.entity.Order;
import com.songlanyun.modules.order.model.vo.SaleStatisticsVo;
import com.songlanyun.modules.order.service.OrderStatisticsService;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service("orderStatisticsService")
public class OrderStatisticsServiceImpl  extends ServiceImpl<OrderDao, Order> implements OrderStatisticsService {
    @Override
    public Integer loadOrderNumByTime(Long shopId, Long startTime, Long endTime) {
        return this.baseMapper.loadOrderNumByTime(shopId, startTime, endTime);
    }

    @Override
    public BigDecimal loadOrderAmountByTime(Long shopId, Long startTime, Long endTime) {
        return this.baseMapper.loadOrderAmountByTime(shopId, startTime, endTime);
    }

    @Override
    public Integer loadWaitOperationNum(Long shopId, OrderConstant.TransactionStatus transactionStatus) {
        return this.baseMapper.loadWaitOperationNum(shopId, transactionStatus.getCode());
    }


}
